Imports CapaDeDatos
Public Class nImpRecCheque
  Private  ImpRecCheque as dImpRecCheque= New dImpRecCheque()
  Public Function Insertar(ByVal IdRecibo as String,ByVal IdCheque as String) as BOOLEAN
     if IdRecibo <> "" and IdCheque <> "" then 
       return ImpRecCheque.Insertar(IdRecibo ,IdCheque )
     End If
     Return FALSE
  End Function
  Public Function Eliminar(ByVal IdImpRecCheque as String) as BOOLEAN
     if IdImpRecCheque <> "" then 
       RETURN ImpRecCheque.Eliminar(IdImpRecCheque )
     End If
     Return false
    End Function
    Public Function EliminarRecibo(ByVal IdRecibo As String) As Boolean
        Dim exito = True
        Dim dtsImputaciones As DataSet = ImpRecCheque.BuscarFiltrado("", "", IdRecibo)
        For Each row As DataRow In dtsImputaciones.Tables(0).Rows
            exito = exito And ImpRecCheque.Eliminar(row("IdImpRecCheque").ToString)
        Next
        Return exito
    End Function
  Public Function BuscarFiltrado(ByVal IdImpRecCheque as String,ByVal IdRecibo as String,ByVal IdCheque as String) as DATASET
    Return ImpRecCheque.BuscarFiltrado(IdImpRecCheque ,IdRecibo ,IdCheque ) 
  End Function
End Class
